#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>

void strcat1(char* ch1, char* ch2) {

	//strlen(ch1)
	int i = 0;
	while (ch1[i]!='\0')
	{
		i++;
	}
	/*printf("%d\n", i);
	printf("%d\n", strlen(ch1));*/
	int j = 0;
	while (ch2[j]!='\0')
	{
		ch1[i + j] = ch2[j];
		j++;
	}
}

void strcat2(char* ch1, char* ch2) {


	int i = 0;
	while (*(ch1+i) != '\0')
	{
		i++;
	}
	/*printf("%d\n", i);
	printf("%d\n", strlen(ch1));*/
	int j = 0;
	while (*(ch2+j) != '\0')
	{
		*(ch1+i+j) = *(ch2+j);
		j++;
	}
}

void strcat3(char* ch1, char* ch2) {


	while (*ch1)ch1++;

	while(*ch2) {
		*ch1 = *ch2;
		ch1++;
		ch2++;
	}
}

void strcat(char* ch1, char* ch2) {


	while (*ch1)ch1++;

	while (*ch1++ = *ch2++);
}
int main21() {
	char ch1[100] = "hello";
	char ch2[] = "world";
	strcat(ch1, ch2);
	printf("%s\n", ch1);
	return 0;
}